import java.util.Scanner;

public class CryptoQuiz {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int BITs = 0;
		System.out.print("Enter 1 to guess a cryptographic system, 2 to guess "
				+ "how many BITs:"); // anything except these two numbers will
										// terminate the program automatically
		int choice = sc.nextInt();

		if (choice == 1) {
			System.out.print("Choose number of BITs:");
			BITs = sc.nextInt();

			if (BITs == 80 || BITs == 128 || BITs == 168 || BITs == 768) {
				System.out.println("Which cryptographic system uses " + BITs
						+ " BITs?");
				String cryptSystem = sc.next();

				if (BITs == 80 && cryptSystem.equals("Skipjack")) {
					System.out.println("Correct!");
				} else if (BITs == 128 && cryptSystem.equals("Rijndael")) {
					System.out.println("Correct!");
				} else if (BITs == 168 && cryptSystem.equals("TripleDES")) {
					System.out.println("Correct!");
				} else if (BITs == 768 && cryptSystem.equals("RSA")) {
					System.out.println("Correct!");
				} else {
					System.out.println("Incorrect!");
				}
			} else {
				System.out.println("Invalid choice.");
			}
		}

		if (choice == 2) {
			System.out.println("Choose a cryptographic system:");
			String cryptSystem = sc.next();

			if (cryptSystem.equals("Skipjack")
					|| cryptSystem.equals("Rijndael")
					|| cryptSystem.equals("TripleDES")
					|| cryptSystem.equals("RSA")) {
				System.out.println("How many bits used in a " + cryptSystem
						+ " system?");
				BITs = sc.nextInt();

				if (BITs == 80 && cryptSystem.equals("Skipjack")) {
					System.out.println("Correct!");
				} else if (BITs == 128 && cryptSystem.equals("Rijndael")) {
					System.out.println("Correct!");
				} else if (BITs == 168 && cryptSystem.equals("TripleDES")) {
					System.out.println("Correct!");
				} else if (BITs == 768 && cryptSystem.equals("RSA")) {
					System.out.println("Correct!");
				} else {
					System.out.println("Incorrect!");
				}

			} else {
				System.out.println("Invalid choice.");
			}
		}
		sc.close();

	}
}
